package com.yowasa.xiuxian.entity.bo.item;


import lombok.Data;
import org.omg.PortableInterceptor.INACTIVE;

//装备属性
@Data
public class ItemAttr {
    //{"hp":603,"mp":97,"atk":26,"spell":14,"def":38,"res":14,"imm":25,"spd":243}

    private Integer quality;

    private int hp = 0;

    private int mp = 0;

    private int atk = 0;

    private int spell = 0;

    private int def = 0;

    private int res = 0;

    private int imm = 0;

    private int spd = 0;

    public ItemAttr updateByRate(ItemAttr attr, double rate){
        attr.hp *= rate;
        attr.mp *= rate;
        attr.atk *= rate;
        attr.spell *= rate;
        attr.def *= rate;
        attr.res *= rate;
        attr.imm *= rate;
        attr.spd *= rate;
        return attr;
    }
}
